Calculate total bidirectional links in a mesh topology by summing an adjacency matrix and dividing by two to prevent double-counting.